<!DOCTYPE html>
<html>
<!--
    作者：姜存浩
    时间：2018-03-18
    描述：
-->

<head lang="zh-CN">
    <title>专利申请数量</title>

    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

    <meta charset="utf-8">

    <!-- 引入Jquery -->
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>

    <!-- 引入Bootstrap -->
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
          integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"
            integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
            crossorigin="anonymous"></script>

    <!-- 引入BootStrap-table -->
    <link rel="stylesheet" href="../assets/libs/bootstrap-table-master/dist/bootstrap-table.min.css">
    <script src="../assets/libs/bootstrap-table-master/dist/bootstrap-table.min.js"></script>

    <!-- 引入Bootstrap-paginator -->
    <script src="../assets/libs/bootstrap-paginator-master/build/bootstrap-paginator.min.js"></script>

    <!-- 引入Echarts -->
    <script src="../assets/libs/echarts/echarts.min.js"></script>
</head>

<body>
<div class="container">
    <div>
        <ul class="nav nav-tabs">
            <li role="presentation" id="tableTag"><a href="javascript:;" onclick="showTable()">&nbsp;<span
                    class="glyphicon glyphicon-th-large"></span>&nbsp;</a></li>
            <li role="presentation" id="imageTag"><a href="javascript:;" onclick="showImage()">&nbsp;<span
                    class="glyphicon glyphicon-tasks"></span>&nbsp;</a></li>
        </ul>
    </div>

    <div id="tableView">
        <div class="page-header" style="text-align: center;">
            <h3>专利申请数量</h3>
            <br>
            <h4 style="margin-top: -20px;">Patent Applications</h4>
        </div>

        <table class="table table-hover table-striped">
            <tr>
                <td style="text-align: center;">国家</td>
                <td>时间</td>
                <td>居民专利申请数量（件）</td>
                <td>非居民专利申请数量（件）</td>
              
            </tr>
            
            <tr>
                <td rowspan="3" style="font-size:1.5em;text-align: center;display: table-cell;vertical-align: inherit;">阿尔巴尼亚</td>
                <td>2005</td>
                <td>0</td>
                <td>386</td>
                
            </tr>
            
            <tr>
                <td>2010</td>
                <td>0</td>
                <td>0</td>
                
            </tr>
            <tr>
                <td>2014</td>
                <td>10</td>
                <td>3</td>
                
            </tr>
            

           
            <tr>
                <td rowspan="3" style="font-size:1.5em;text-align: center;display: table-cell;vertical-align: inherit;">爱沙尼亚</td>
                <td>2005</td>
                <td>23</td>
                <td>15</td>
                
            </tr>
            <tr>
                <td>2010</td>
                <td>84</td>
                <td>13</td>
               
            </tr>
            <tr>
                <td>2014</td>
                <td>44</td>
                <td>6</td>
                
            </tr>
            
            <tr>
                <td rowspan="3" style="font-size:1.5em;text-align: center;display: table-cell;vertical-align: inherit;">保加利亚</td>
                <td>2005</td>
                <td>261</td>
                <td>52</td>
             
            </tr>
            <tr>
                <td>2010</td>
                <td>243</td>
                <td>17</td>
             
            </tr>
            <tr>
                <td>2014</td>
                <td>218</td>
                <td>16</td>
            
            </tr>

            
            <tr>
                <td rowspan="3" style="font-size:1.5em;text-align: center;display: table-cell;vertical-align: inherit;">波兰</td>
                <td>2005</td>
                <td>2028</td>
                <td>4555</td>
            
            </tr>
            <tr>
                <td>2010</td>
                <td>3203</td>
                <td>227</td>
        
            </tr>
            <tr>
                <td>2014</td>
                <td>3941</td>
                <td>155</td>
             
            </tr>

            
            <tr>
                <td rowspan="3" style="font-size:1.5em;text-align: center;display: table-cell;vertical-align: inherit;">黑山</td>
                <td>2005</td>
                <td>0</td>
                <td>0</td>
           
            </tr>
            <tr>
                <td>2010</td>
                <td>23</td>
                <td>136</td>
               
            </tr>
            <tr>
                <td>2014</td>
                <td>13</td>
                <td>0</td>
               
            </tr>

            
            <tr>
                <td rowspan="3" style="font-size:1.5em;text-align: center;display: table-cell;vertical-align: inherit;">捷克</td>
                <td>2005</td>
                <td>586</td>
                <td>244</td>
              
            </tr>
            <tr>
                <td>2010</td>
                <td>868</td>
                <td>114</td>
             
            </tr>
            <tr>
                <td>2014</td>
                <td>910</td>
                <td>62</td>
              
            </tr>

            
            <tr>
                <td rowspan="3" style="font-size:1.5em;text-align: center;display: table-cell;vertical-align: inherit;">克罗地亚</td>
                <td>2005</td>
                <td>363</td>
                <td>649</td>
              
            </tr>
            <tr>
                <td>2010</td>
                <td>257</td>
                <td>21</td>
              
            </tr>
            <tr>
                <td>2014</td>
                <td>170</td>
                <td>30</td>
             
            </tr>

            
            <tr>
                <td rowspan="3" style="font-size:1.5em;text-align: center;display: table-cell;vertical-align: inherit;">拉脱维亚</td>
               <td>2005</td>
                <td>112</td>
                <td>57</td>
            
            </tr>
            <tr>
                <td>2010</td>
                <td>178</td>
                <td>7</td>
            
            </tr>
            <tr>
                <td>2014</td>
                <td>103</td>
                <td>4</td>
             
            </tr>
            
            <tr>
                <td rowspan="3" style="font-size:1.5em;text-align: center;display: table-cell;vertical-align: inherit;">立陶宛</td>
                <td>2005</td>
                <td>68</td>
                <td>47</td>
          
            </tr>
            <tr>
                <td>2010</td>
                <td>108</td>
                <td>6</td>
              
            </tr>
            <tr>
                <td>2014</td>
                <td>123</td>
                <td>42</td>
              
            </tr>

            
            <tr>
                <td rowspan="3" style="font-size:1.5em;text-align: center;display: table-cell;vertical-align: inherit;">罗马尼亚</td>
               <td>2005</td>
                <td>916</td>
                <td>68</td>
            
            </tr>
            <tr>
                <td>2010</td>
                <td>1382</td>
                <td>36</td>
                
            </tr>
            <tr>
                <td>2014</td>
                <td>952</td>
                <td>84</td>
            
            </tr>

            
            <tr>
                <td rowspan="3" style="font-size:1.5em;text-align: center;display: table-cell;vertical-align: inherit;">马其顿</td>
                <td>2005</td>
                <td>53</td>
                <td>15</td>
              
            </tr>
            <tr>
                <td>2010</td>
                <td>27</td>
                <td>1</td>
              
            </tr>
            <tr>
                <td>2014</td>
                <td>0</td>
                <td>0</td>
               
            </tr>

            
            <tr>
                <td rowspan="3" style="font-size:1.5em;text-align: center;display: table-cell;vertical-align: inherit;">塞尔维亚</td>
                <td>2005</td>
                <td>372</td>
                <td>609</td>
              
            </tr>
            <tr>
                <td>2010</td>
                <td>290</td>
                <td>39</td>
               
            </tr>
            <tr>
                <td>2014</td>
                <td>202</td>
                <td>10</td>
               
            </tr>

            
            <tr>
                <td rowspan="3" style="font-size:1.5em;text-align: center;display: table-cell;vertical-align: inherit;">斯洛伐克</td>
                <td>2005</td>
                <td>155</td>
                <td>95</td>
             
            </tr>
            <tr>
                <td>2010</td>
                <td>234</td>
                <td>48</td>
                
            </tr>
            <tr>
                <td>2014</td>
                <td>211</td>
                <td>23</td>
              
            </tr>

           
            <tr>
                <td rowspan="3" style="font-size:1.5em;text-align: center;display: table-cell;vertical-align: inherit;">斯洛文尼亚</td>
                <td>2005</td>
                <td>344</td>
                <td>29</td>
               
            </tr>
            <tr>
                <td>2010</td>
                <td>442</td>
                <td>11</td>
               
            </tr>
            <tr>
                <td>2014</td>
                <td>0</td>
                <td>0</td>
              
            </tr>

            
            <tr>
                <td rowspan="3" style="font-size:1.5em;text-align: center;display: table-cell;vertical-align: inherit;">匈牙利</td>
                <td>2005</td>
                <td>705</td>
                <td>497</td>
               
            </tr>
            <tr>
                <td>2010</td>
                <td>649</td>
                <td>47</td>
               
            </tr>
            <tr>
                <td>2014</td>
                <td>546</td>
                <td>73</td>
               
            </tr>
			<tr>
                <td rowspan="3" style="font-size:1.5em;text-align: center;display: table-cell;vertical-align: inherit;">波黑</td>
                <td>2005</td>
                <td>66</td>
                <td>306</td>
                
            </tr>
            <tr>
                <td>2010</td>
                <td>56</td>
                <td>9</td>
              
            </tr>
            <tr>
                <td>2014</td>
                <td>41</td>
                <td>2</td>
              
            </tr>
            
        </table>
    </div>

    <!--
        作者：姜存浩
        时间：2018-03-18
        
    -->
    <div id="imageView">
        <div class="page-header" style="text-align: center;">
            <h3>专利申请数量</h3>
            <br>
            <h4 style="margin-top: -20px;"> Patent Applications</h4>
        </div>
        <div class="panel" style="margin-top:1.5em">
            <!--<div style="text-align: right;">单位:&nbsp;件</div>-->
            <div id="main" style="width: 100%;height:400px;"></div>
        </div>
    </div>
<div style="color: #959595; margin-top: 1.5em;">*此数据仅展现最近五年，若需全部数据请点击&nbsp;<a href="#" class="btn btn-info btn-xs">
    <span class="glyphicon glyphicon-save"></span> 下载
</a></div>

    <!-- <div style="text-align: right;"><div id="page"></div></div> -->
</div>
</body>
<script>
    $(function () {
        $('#all').hide()
        $('#imageView').hide();
        $('#imageView2').hide();
        $('#tableTag').attr('class', 'active');
    })

    function showTable() {
        $('#all').hide()
        $('#tableView').show();
        $('#tableView2').show();
        $('#imageView').hide();
        $('#imageView2').hide()
        $('#tableTag').attr('class', 'active');
        $('#imageTag').removeClass('active');
        $('#first').show()
        $('#second').show()
    }

    function showImage() {
        $('#all').show()
        $('#imageView').show();
        $('#tableView').hide();
        $('#tableView2').hide();
        $('#imageView2').show();
        $('#imageTag').attr('class', 'active');
        $('#tableTag').removeClass('active');
        $('#first').hide()
        $('#second').hide()
    }

    $('#tableData').bootstrapTable({
        striped: true,
        columns: [{
            field: 'country',
            title: '国家',


        },
            

        ]
    });

    var all = {
        "data": [
            //05居民专利
            [0,23,261,2028,0,586,363,112,68,916,53,372,155,344,705,66],
            //05非居民专利
            [386,15,52,4555,0,244,649,57,47,68,15,609,95,29,497,306],
            //10居民专利
            [0,84,243,3203,23,868,257,178,108,1382,27,290,234,442,649,56],
            //10非居民专利
            [0,13,17,227,136,114,21,7,6,36,1,39,48,11,47,9],
            //14居民专利
            [10,44,218,3941,13,910,170,103,123,952,0,202,211,0,546,41],
            //14非居民专利
            [3,6,16,155,0,62,304,42,84,0,10,230,73,2],
           
            
        ],
        "countrys": ["阿尔巴尼亚", "爱沙尼亚", "保加利亚", "波兰", "黑山", "捷克", "克罗地亚", "拉脱维亚", "立陶宛", "罗马尼亚", "马其顿", "塞尔维亚", "斯洛伐克", "斯洛文尼亚", "匈牙利", "波黑"],
        "years": ["2005年", "2010年", "2014年"]
    };

    var option = {
        timeline: {
            axisType: 'category',
            autoPlay: true,
            playInterval: 2000,
            data: all.years
        },
        options: [{
            tooltip: {
                trigger: 'axis'
            },
            title:{
                subtext:'数据来源'
            },
            calculable: true,
            grid: {
                top: 50,
                bottom: 100
            },
            legend: {
                data: ['居民专利申请数量', '非居民专利申请数量']
            },
            xAxis: [{
                type: 'category',
                axisLabel: {
                    interval: 0
                },
                data: all.countrys
            }],
            yAxis: [{
                type: 'value',
                name: '件'
            }],
            //05
            series: [{
                name: '居民专利申请数量',
                type: 'bar',
                data: all.data[0]
            }, {
                name: '非居民专利申请数量',
                type: 'bar',
                data: all.data[1]
            }, ]
        },
            //10
            {
                series: [{
                    data: all.data[2]
                }, {
                    data: all.data[3]
                }]
            },
            //13
            {
                series: [{
                    data: all.data[4]
                }, {
                    data: all.data[5]
                }]
            },
            //14
            {
                series: [{
                    data: all.data[6]
                }, {
                    data: all.data[7]
                }]
            },
            //15
            {
                series: [{
                    data: all.data[8]
                }, {
                    data: all.data[9]
                }]
            }
        ]
    };
    var myChart = echarts.init(document.getElementById('main'));
    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
</script>

</html>